Integrand size = 42, antiderivative size = 178 \[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\frac {2 C \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 b B \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{d \sqrt {a+b \cos (c+d x)}}+\frac {2 a B \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticPi}\left (2,\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{d \sqrt {a+b \cos (c+d x)}} \]
[Out]
Time = 0.56 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3108, 3081, 2734, 2732, 2882, 2742, 2740, 2886, 2884} \[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\frac {2 b B \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{d \sqrt {a+b \cos (c+d x)}}+\frac {2 a B \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticPi}\left (2,\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{d \sqrt {a+b \cos (c+d x)}}+\frac {2 C \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}} \]
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2882
Rule 2884
Rule 2886
Rule 3081
Rule 3108
Rubi steps \begin{align*} \text {integral}& = \int \sqrt {a+b \cos (c+d x)} (B+C \cos (c+d x)) \sec (c+d x) \, dx \\ & = B \int \sqrt {a+b \cos (c+d x)} \sec (c+d x) \, dx+C \int \sqrt {a+b \cos (c+d x)} \, dx \\ & = (a B) \int \frac {\sec (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx+(b B) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx+\frac {\left (C \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{\sqrt {\frac {a+b \cos (c+d x)}{a+b}}} \\ & = \frac {2 C \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {\left (a B \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {\sec (c+d x)}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{\sqrt {a+b \cos (c+d x)}}+\frac {\left (b B \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{\sqrt {a+b \cos (c+d x)}} \\ & = \frac {2 C \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 b B \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{d \sqrt {a+b \cos (c+d x)}}+\frac {2 a B \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticPi}\left (2,\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{d \sqrt {a+b \cos (c+d x)}} \\ \end{align*}
Time = 12.69 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.60 \[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\frac {2 \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \left ((a+b) C E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )+B \left (b \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )+a \operatorname {EllipticPi}\left (2,\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )\right )\right )}{d \sqrt {a+b \cos (c+d x)}} \]
[In]
[Out]
Time = 8.39 (sec) , antiderivative size = 247, normalized size of antiderivative = 1.39
method | result | size |
default | \(-\frac {2 \sqrt {\left (2 b \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a -b \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 b \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a -b}{a -b}}\, \left (B b F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right )-B a \Pi \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), 2, \sqrt {-\frac {2 b}{a -b}}\right )+C E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) a -C E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) b \right )}{\sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +\left (a +b \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 b \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b}\, d}\) | \(247\) |
parts | \(-\frac {2 B \sqrt {\left (2 b \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a -b \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 b \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a -b}{a -b}}\, \left (F\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) b -\Pi \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), 2, \sqrt {-\frac {2 b}{a -b}}\right ) a \right )}{\sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +\left (a +b \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 b \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b}\, d}-\frac {2 C \sqrt {\left (2 b \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a -b \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {\frac {2 b \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a -b}{a -b}}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {-\frac {2 b}{a -b}}\right ) \left (a -b \right )}{\sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +\left (a +b \right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 b \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b}\, d}\) | \(366\) |
[In]
[Out]
\[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \sqrt {b \cos \left (d x + c\right ) + a} \sec \left (d x + c\right )^{2} \,d x } \]
[In]
[Out]
\[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\int \left (B + C \cos {\left (c + d x \right )}\right ) \sqrt {a + b \cos {\left (c + d x \right )}} \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx \]
[In]
[Out]
\[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \sqrt {b \cos \left (d x + c\right ) + a} \sec \left (d x + c\right )^{2} \,d x } \]
[In]
[Out]
\[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )\right )} \sqrt {b \cos \left (d x + c\right ) + a} \sec \left (d x + c\right )^{2} \,d x } \]
[In]
[Out]
Timed out. \[ \int \sqrt {a+b \cos (c+d x)} \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\int \frac {\left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )\right )\,\sqrt {a+b\,\cos \left (c+d\,x\right )}}{{\cos \left (c+d\,x\right )}^2} \,d x \]
[In]
[Out]